<?php
class ZsxmlcModel extends Action{
	//test
	//
	//############test
	public function add($zsxmlctm,$zsxmid,$zsxmlcctt){
		$info=collectinfo(__METHOD__,'$zsxmlctm,$zsxmid,$zsxmlcctt',array($zsxmlctm,$zsxmid,$zsxmlcctt));
		
		$dt=array('zsxmlctm'=>$zsxmlctm,'f_zsxmlc_zsxmid'=>$zsxmid,'zsxmlcctt'=>$zsxmlcctt);
		$zsxmlc=M('zsxmlc');
		$zsxmlc->data($dt)->add();

		return createarrok('ok',$data,'',$info);
	}

	public function getzsxmlclsbyzsxmid($zsxmid){
		$info=collectinfo(__METHOD__,'$zsxmid',array($zsxmid));
		
		
		$zsxmlc=M('zsxmlc');
		$zsxmlcls=$zsxmlc->where('f_zsxmlc_zsxmid='.$zsxmid)->order('zsxmlcid ASC')->select();

		return createarrok('ok',$zsxmlcls,'',$info);
	}

	public function deletebyzsxmid($zsxmid){
		$info=collectinfo(__METHOD__,'$zsxmid',array($zsxmid));
		
		
		$zsxmlc=M('zsxmlc');
		$zsxmlc->where('f_zsxmlc_zsxmid='.$zsxmid)->delete();

		return createarrok('ok',$data,'',$info);
	}
	

} 
?>